﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Logic
{
    class Message
    {
        public string Info { get; set; }
        public List<object> Params { get; set; }
        public string Type { get; set; }
        
        public Message(string type, string info, List<object> paramList = null)
        {
            this.Type = type;
            this.Info = info;
            this.Params = paramList ?? new List<object>();
        }

        public Message()
        {
        }

        public override string  ToString()
        {
            var strRep = string.Format("TYPE: {0} INFO: {1}", this.Type, this.Info);
 	        return strRep;
        }

        public bool IsEqualTo(Message other)
        {
            if (this.Info == other.Info && this.Type == other.Type && this.Params == other.Params)
            {
                return true;
            }
            return false;
        }
    }
}
